while True:
    print("请输入以下信息，并用空格分割")
    input_str = input("性别 体重（kg) 身高（cm） 年龄:")
    str_list = input_str.split(' ')
    bmr1, bmr2 = "", ""
    try:
        gender = str_list[0]
        weight = float(str_list[1])
        height = float(str_list[2])
        age = int(str_list[3])

        if (gender == '男') or (gender == 'man'):
            bmr2 = 13.7 * weight + 5.0 * height - 6.8 * age + 66
            bmr1 = 10 * weight + 6.25 * height - 5 * age + 5
            print("您的性别：{}，体重：{}公斤，身高{}厘米，年龄{}岁".format(gender, weight, height, age))
            print("BMR='{0}',BMR(美国标准）='{1}'".format(bmr1, bmr2))

        elif (gender == '女') or (gender == 'woman'):
            bmr2 = 9.6 * weight + 1.8 * height - 4.7 * age + 655
            bmr1 = 10 * weight + 6.25 * height - 5 * age - 161
            print("您的性别：{}，体重：{}公斤，身高{}厘米，年龄{}岁".format(gender, weight, height, age))
            print("BMR='{0}',BMR(美国标准）='{1}'".format(bmr1, bmr2))

        else:
            print('性别填写有误')

    except ValueError:
        print('年龄须为整数')
    except IndexError:
        print('输入的信息过少')
    except:
        print('程序异常！')
    print()
    y_or_n = input('是否退出程序（是/否)')
    if y_or_n == "是":
        print("结束运行")
        break